import { schedulingList } from '@/api/url/taskSwitching';
import router from '@/router';
import { reactive } from 'vue';

export default function importFunction() {
  const base = reactive({
    baseList: null,
  });
  const init = () => {
    schedulingList().then((res: any) => {
      if (res.code === 200) {
        base.baseList = res.data.array;
      }
    });
  };
  const tapDataTransmit = (value: any) => {};

  const toggle = (value: any) => {
    router.push({
      name: 'home',
      query: {
        ...value,
      },
    });
  };
  return {
    init,
    base,
    toggle,
  };
}
